import { useRoutes } from "react-router-dom";
import { lazy,Suspense } from "react";
import Home from '../views/Home'
// import About from '../views/About'
const About = lazy(()=>import('../views/About'))
const RouterView=()=>{
    const routes=useRoutes([
        {
            path:"/",
            element:<Home/>
        },{
            path:"/about",
            element:<Suspense fallback={<div>loading</div>}>
                <About/>
            </Suspense>
        }
    ])
    return routes
}
export default RouterView;